package constants;

import java.util.ArrayList;
import java.util.Arrays;

public class DocumentConstants {
	
	
	public static final ArrayList<Integer> pesosPrimeiroDigitoCNPJ = new ArrayList<Integer>(Arrays.asList(5,4,3,2,9,8,7,6,5,4,3,2));
	public static final ArrayList<Integer> pesosSegundoDigitoCNPJ = new ArrayList<Integer>(Arrays.asList(6,5,4,3,2,9,8,7,6,5,4,3,2));
	
	
	//CPF
	public static String getCPFArea(int digito) throws NumberFormatException{
		if(digito>10){
			throw new NumberFormatException();
		}
		if(digito==0){
				return CPF_AREA_0;
		}
		if(digito==1){
			return CPF_AREA_1;
		}
		if(digito==2){
			return CPF_AREA_2;
		}
		if(digito==3){
			return CPF_AREA_3;
		}
		if(digito==4){
			return CPF_AREA_4;
		}
		if(digito==5){
			return CPF_AREA_5;
		}
		if(digito==6){
			return CPF_AREA_6;
		}
		if(digito==7){
			return CPF_AREA_7;
		}
		if(digito==8){
			return CPF_AREA_8;
		}
		else{
			return CPF_AREA_9;
		}
	}
	
	public static final String CPF_AREA_1 = "DF/GO/MS/MT/TO";
	public static final String CPF_AREA_2 = "AC/AM/AP/PA/RO/RR";
	public static final String CPF_AREA_3 = "CE/MA/PI";
	public static final String CPF_AREA_4 = "AL/PB/PE/RN";
	public static final String CPF_AREA_5 = "BA/SE";
	public static final String CPF_AREA_6 = "MG";
	public static final String CPF_AREA_7 = "ES/RJ";
	public static final String CPF_AREA_8 = "SP";
	public static final String CPF_AREA_9 = "PR/SC";
	public static final String CPF_AREA_0 = "RS";
}
